package com.itheima.Homework5;

public class Test06 {
    public static void main(String[] args) {
        //调用并输出
        System.out.println(test(3.14));
    }
    public static double test(double a){
        if(a >=0){
            //正数直接返回
            return a;
        }else {
            //取反
            double i = -a;
            return i;
        }
    }
}
